Skip to content

OCPBUGS-86544: bootstrap: limit jq RepoDigests filter to first match#10705

Open
jira-solve-bot wants to merge 1 commit into
openshift:mainfrom
jira-solve-bot:fix-OCPBUGS-86544
Open

OCPBUGS-86544: bootstrap: limit jq RepoDigests filter to first match#10705
jira-solve-bot wants to merge 1 commit into
openshift:mainfrom
jira-solve-bot:fix-OCPBUGS-86544

Conversation

@jira-solve-bot

@jira-solve-bot jira-solve-bot commented Jul 22, 2026

Copy link
Copy Markdown

Description

When the release image has been pulled from multiple registries, podman inspect returns multiple RepoDigests with the same digest. The jq filter returned all matches as a multi-line string, which was assigned to RELEASE_IMAGE_DIGEST. Downstream consumers like crio-configure.sh then passed this invalid multi-line reference to podman run, causing "invalid reference format" errors that blocked bootkube.service and failed the entire cluster bootstrap.

This change wraps the jq filter with first() so only one RepoDigest is returned, regardless of how many registries have cached the image.

Jira

https://redhat.atlassian.net/browse/OCPBUGS-86544


Always review AI generated responses prior to use.
Generated with Claude Code via openshift-developer plugin


Note: This PR was auto-generated by the jira-agent periodic CI job in response to OCPBUGS-86544. See the full report for token usage, cost breakdown, and detailed phase output.

Summary by CodeRabbit

  • Bug Fixes
    • Improved release image digest detection to select the correct matching digest when processing image metadata.
    • Ensures the generated release image digest is more accurate and consistent, while preserving existing fallback warnings when no match is found.

When the release image has been pulled from multiple registries, podman
inspect returns multiple RepoDigests with the same digest. The jq filter
returned all matches as a multi-line string, which was assigned to
RELEASE_IMAGE_DIGEST. Downstream consumers like crio-configure.sh then
passed this invalid multi-line reference to podman run, causing
"invalid reference format" errors that blocked bootkube.service and
failed the entire cluster bootstrap.

Wrap the jq filter with first() so only one RepoDigest is returned,
regardless of how many registries have cached the image.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@jira-solve-bot: This pull request references Jira Issue OCPBUGS-86544, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Description

When the release image has been pulled from multiple registries, podman inspect returns multiple RepoDigests with the same digest. The jq filter returned all matches as a multi-line string, which was assigned to RELEASE_IMAGE_DIGEST. Downstream consumers like crio-configure.sh then passed this invalid multi-line reference to podman run, causing "invalid reference format" errors that blocked bootkube.service and failed the entire cluster bootstrap.

This change wraps the jq filter with first() so only one RepoDigest is returned, regardless of how many registries have cached the image.

Jira

https://redhat.atlassian.net/browse/OCPBUGS-86544


Always review AI generated responses prior to use.
Generated with Claude Code via openshift-developer plugin

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 22, 2026
@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Hi @jira-solve-bot. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 4732d46c-b061-4447-86e2-bc4120db6309

📥 Commits

Reviewing files that changed from the base of the PR and between b7140c7 and b83979d.

📒 Files selected for processing (1)
  • data/data/bootstrap/files/usr/local/bin/release-image.sh.template

📝 Walkthrough

Walkthrough

Changes

Release image digest resolution

Layer / File(s) Summary
Select the release image digest
data/data/bootstrap/files/usr/local/bin/release-image.sh.template
The jq expression now selects the first matching RepoDigests entry when deriving RELEASE_IMAGE_DIGEST; the existing empty-value fallback remains unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the bootstrap jq change to limit RepoDigests to the first match.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Only release-image.sh.template changed; no Ginkgo test titles were added or modified.
Test Structure And Quality ✅ Passed Only a shell template changed; no Ginkgo tests or test infrastructure were modified, so the test-structure check is not applicable.
Microshift Test Compatibility ✅ Passed Only a bootstrap shell template changed; no new Ginkgo e2e tests or MicroShift-sensitive APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only changes a bootstrap shell template; no Ginkgo tests or SNO-sensitive assumptions were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only a bootstrap shell script changed; it adjusts jq digest selection and introduces no manifests, replicas, affinity, selectors, or topology-aware scheduling.
Ote Binary Stdout Contract ✅ Passed Only a jq filter in a shell template changed; no process-level Go entrypoint or stdout write was added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only release-image.sh.template changed; no new Ginkgo e2e tests were added, so IPv4/disconnected compatibility checks are not applicable.
No-Weak-Crypto ✅ Passed The only code change is a jq first() selection in release-image.sh.template; no weak crypto or secret comparison logic is present.
Container-Privileges ✅ Passed PASS: The PR only updates a shell template jq filter; no container/K8s manifest changes or privileged fields (privileged, hostNetwork, allowPrivilegeEscalation, SYS_ADMIN) were added.
No-Sensitive-Data-In-Logs ✅ Passed The touched script only adds a generic warning; it does not echo pull specs, digests, credentials, hostnames, or user data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign barbacbd for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
openshift-ci Bot requested review from patrickdillon and sadasu July 22, 2026 10:15
@rna-afk

rna-afk commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

/ok-to-test

@openshift-ci openshift-ci Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 22, 2026
@rna-afk

rna-afk commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rna-afk: This pull request references Jira Issue OCPBUGS-86544, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rna-afk

rna-afk commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

/test e2e-aws-ovn

@rna-afk

rna-afk commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

/test e2e-azure-ovn

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@jira-solve-bot: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azure-ovn b83979d link true /test e2e-azure-ovn

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants